import { onMounted, ref } from 'vue'
import { getBannerList } from '@/api/layout.js'

export function useBanner() {
  const bannerList = ref([])
  async function getBannerData() {
    const res = await getBannerList(2)
    console.log('打印banner', res)
    bannerList.value = res.result
  }
  onMounted(() => {
    getBannerData()
  })
  return {
    bannerList,
  }
}
